<?php
session_start();
header("content-type:text/html; charset=utf-8");
require_once("../../utils/conn.php");


    $db = new mysql_db();
    $fetch_weibo="select * from weibo where familyNum='".$_SESSION['family_current']."'";
    $fetchWb_res=$db->data($fetch_weibo);
     if($fetchWb_res['total']<0){
         echo ($db->createJson(false,"","System error"));
     }elseif($fetchWb_res['total']==0){
         echo ($db->createJson(false,"","no data"));
     }else{
           $data= array();
           foreach ($fetchWb_res["data"] as $value) {
               //$tagArr= $value["myTag"]==null?'""':explode(",",$value["myTag"]) ;
              // $tagArr=$tagArr==""?"":json_encode($tagArr);
               $data[]='{"content":"'.$value["content"].'","author":"'.$value["author"] . '","issueTime":"'.$value["issueTime"] . '","replys":"'.$value["replys"] .'","photo":"'.$value["photo"] .'"}';
           }
         echo($db->createJson(true,json_encode($data),""));
     }
?>